package com.imagecollector.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author wrf
 * @since 2024-07-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
@ApiModel(value="User对象", description="")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "手机号")
    private Integer phone;

    @ApiModelProperty(value = "密码（默认pxpx123）")
    private String password;

    @ApiModelProperty(value = "地区id")
    private Integer distirctId;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "状态 0正常 1冻结")
    private Integer status;

    @ApiModelProperty(value = "用户角色 1普通用户 2客服 3管理员")
    private Integer role;

    @ApiModelProperty(value = "第三方平台用户id")
    private String openId;

    @ApiModelProperty(value = "访问令牌")
    private String accessToken;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;


}
